import 'package:get/get.dart';
import 'package:study_demo/api/api.dart';
import 'package:study_demo/base/BaseController.dart';
import 'package:study_demo/ui/game/xy_game6/game_center_page6.dart';
import 'package:study_demo/ui/game/xy_game7/game_center_page7.dart';
import 'package:url_launcher/url_launcher.dart';

import 'examples/padracing/padracing_widget.dart';
import 'examples/rogue_shooter/rogue_shooter_widget.dart';
import 'xy_game1/game_center_page1.dart';
import 'xy_game2/game_center_page2.dart';
import 'xy_game3/game_center_page3.dart';
import 'xy_game4/game_center_page4.dart';
import 'xy_game5/game_center_page5.dart';

class GameHallController extends BaseController {
  goExample(int type) {
    if (type == 0) {
      Get.to(PadracingWidget());
    } else {
      Get.to(RogueShooterWidget());
    }
  }

  goCourse() {
    launchUrl(Uri.parse(juejinUrl));
  }

  goGameCenter1() {
    Get.to(GameCenterPage1());
  }

  goGameCenter2() {
    Get.to(GameCenterPage2());
  }

  goGameCenter3() {
    Get.to(GameCenterPage3());
  }

  goGameCenter4() {
    Get.to(GameCenterPage4());
  }

  goGameCenter5() {
    Get.to(GameCenterPage5());
  }

  goGameCenter6() {
    Get.to(GameCenterPage6());
  }

  goGameCenter7() {
    Get.to(GameCenterPage7());
  }
}
